<?php
class Country_Widget_UserProfilePhotoController extends Engine_Content_Widget_Abstract
{
  public function indexAction()
  {
    // Don't render this if not logged in
    $viewer = Engine_Api::_()->user()->getViewer();
    if( !$viewer->getIdentity() ) {
      return $this->setNoRender();
    }

	$label = "Edit My Profile";

	$this->view->label = $label;
	// Get subject and check auth
   
	$this->view->editable = false;
	if( $viewer->authorization()->isAllowed($viewer, 'edit') ) {
		$this->view->editable = true;
		$this->view->id = ( $viewer->getGuid(false) == $viewer->getGuid(false) ? null : $viewer->getIdentity() );
	}
    //if( !$subject->authorization()->isAllowed($viewer, 'view') ) {
    //  return $this->setNoRender();
    //}
  }
}